#!/bin/bash
#
# Demo of taste.  Some tests fail on purpose.
#
# Usage:
#   ./taste-demo.sh <function name>

. taste.sh

test-foo() {
  expect 1 = 1
  expect 1 -eq 1
  expect 1 -lt 1
  expect 1 -le 1
  expect 1 = 2 ''
  expect 1 -eq 2 ''
}

test-check-grep() {
  seq 5 >_tmp/grep.txt
  check_grep '^5$' _tmp/grep.txt
}


test-file-eq-stdin() {
  mkdir -p _tmp
  seq 3 >_tmp/foo.txt

  # TODO: This syntax needs to change
  check_file_eq_stdin _tmp/foo.txt <<EOF
2
3
EOF

}

test-check-file-eq() {
  seq 1 >_tmp/file.txt
  check_file_eq 1 _tmp/file.txt
}

taste-main "$@"
